/*
 * String (long) options parsing
 */

#ifndef _OPT_H_
#define _OPT_H_

#include <stdlib.h>
#include <string.h>


/*
 * edt: soptarg
 *
 * Pointer to the current argument of a command line switch (i.e. -option arg)
 * as a result of calling sgetopt().
 */
extern char *soptarg;


/*
 * edt: sgetopt()
 *
 * Return: char *
 *   command line switch with the preceding '-' stripped off
 *
 * Argument: int argc
 *   IN    - total number of args in argv[]
 *
 * Argument: char *argv[]
 *   IN    - argv[] passed from application
 *
 * Argument: int *index
 *   INOUT - index into argv[] to start processing args
 *
 * Usage: sgetopt() expects argv[] elements of form:
 *
 *     argv     -> procname + arglist
 *     arglist  -> option | (option + argument) | arglist | <EOF>
 *     option   -> "-" + <string>
 *     argument -> <string>
 */
extern char *
sgetopt(int argc, char *argv[], int *index);

#endif /* _OPT_H_ */
